package com.zcf.pojo;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import lombok.Data;

import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 购物车表
 * </p>
 *
 * @author loupeng
 * @since 2018-12-20
 */
@Data
public class Shopping extends Model<Shopping> {

	private static final long serialVersionUID = 1L;

	/**
	 * 购物车id
	 */
	@TableId(value = "shopping_id")
	private String shoppingId;
	/**
	 * 用户id
	 */
	private String userId;
	/**
	 * 
	 */
	private String addtime;

	private String dinId;

	private Integer number;

	private String total;
	@TableField(exist = false)
	private List<Shopp> shopp;
	@TableField(exist = false)
	private List<Dining> dining;
	@TableField(exist = false)
	private int num;
	
	@Override
	protected Serializable pkVal() {
		return this.shoppingId;
	}

	@Override
	public String toString() {
		return "Shopping{" + "shoppingId=" + shoppingId + ", userId=" + userId + ", addtime=" + addtime + ",dinId="
				+ dinId + "}";
	}
}
